home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Run Magazine ReRun 1986 January & February
/
rerun-1986-01-02.d64
/
tax deduction 64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
4KB
|
166 lines
5 n=0:dima$(200,5),ca$(5),c$(6)
10 fori=1to5:reada$:ca$(i)=a$:next
11 fori=1to6:reada$:c$(i)=a$:next
15 poke53281,15:poke53280,12
20 print"[147][144]"tab(9)"itemized tax deductions"
25 print"choose:"
30 printtab(5)"1. load data
35 [153][163]5)"2. add record
36 printtab(5)"3. find a record
40 [153][163]5)"4. change record
45 printtab(5)"5. delete record
50 [153][163]5)"6. display file
55 printtab(5)"7. print file
60 [153][163]5)"8. save data
65 printtab(5)"9. end program
75 [161]k$:[139]k$[178]""[167]75
80 k[178][197](k$):[139]k[179]1[176]k[177]9[167]75
85 [139]k[178]9[167][158]2048:[128]
90 [145]k[141]100,200,700,300,400,500,600,800
95 [137]20
99 [171][171][171][171][171][143] load data-----
100 [153]"loadload-":f1[178]0:[141]2000
105 [139]f1[167][159]2,1,0,fl$:[137]135
110 [159]15,8,15,"io"
115 [159]2,8,2,"0:"[170]fl$[170]",s,r"
120 [132]15,e,e$,e1,e2
125 [153]"disk status:wait"e;e$;e1;e2
130 [139]e[167][160]2:[160]15:[153]"file not loaded":[141]3000:[142]
135 [132]2,n
140 [129]i[178]1[164]n
145 [129]j[178]1[164]5
150 [132]2,a$(i,j)
170 [130]:[130]
175 [160]2:[139]f1[178]0[167][160]15
180 [142]
199 [171][171][171][171][171][143] add data-----
200 n[178]n[170]1:x[178]n
210 [153]"load"
220 [141]4000
230 [133]"any more entries";i$
240 [139][200](i$,1)[178]"y"[167]200
250 [142]
299 [171][171][171][171][171][143] change record-----
300 [153]"load":fl[178]0:f[178]3
310 [133]"check# to be changed";n$
315 [141]1000:[139]fl[178]1[167][142]
320 [141]4000:[142]
399 [171][171][171][171][171][143] delete-----
400 [153]"load":fl[178]0:f[178]3
410 [133]"check# to be deleted";n$
415 [141]1000:[139]fl[178]1[167][142]
420 n[178]n[171]1
425 [129]i[178]x[164]n
430 [129]j[178]1[164]5
435 a$(i,j)[178]a$(i[170]1,j)
455 [130]:[130]
460 [153]"record deleted."
470 [141]3000:[142]
499 [171][171][171][171][171][143] view data-----
500 r[178]0:f[178]0:j[178]0:tl[178]0:[141]5000
505 [153]"load"
510 [153]"cat date ck# description amt"
515 [129]i[178]1[164]39:[153]"usr";:[130]:[153]
520 [129]i[178]1[164]n
535 [139]r[178]2[167][139]n$[179][177]a$(i,f)[167]575
540 j[178]j[170]1
545 [153]a$(i,1);
550 [153][163]4)a$(i,2);
555 [153][163]12)a$(i,3);
560 [153][163]18)[200](a$(i,4),12);
561 [153][163]39[171][195](a$(i,5)))a$(i,5)
565 tl[178]tl[170][197](a$(i,5))
570 [139]j[173]15[178][181](j[173]15)[167][141]3000:[153]"load"
575 [130]
580 [153]"total:wait"tl
585 [141]3000:[142]
599 [171][171][171][171][171][143] print data-----
600 r[178]0:f[178]0:tl[178]0:[141]5000
605 [159]2,4:[157]2
607 [153][163]25)"itemized tax deductions":[153]
608 [139]r[178]2[175]f[178]1[167][153][163]35[171]([195](c$(g)))[173]2);c$(g):[153]
610 [153][163]5)"cat"[166]5)"date"[166]7)"check#"[166]7)"description"[166]15)"amount"
615 [153][163]5);:[129]i[178]1[164]64:[153]"usr";:[130]:[153]
620 [129]i[178]1[164]n
625 [139]r[178]2[175]n$[179][177]a$(i,f)[167]675
645 [153][163]5);a$(i,1);[163]5)a$(i,2);
650 [153][199](16)"25";:[153][163]5[171][195](a$(i,3)))a$(i,3);
655 [153][199](16)"37"a$(i,4);
660 [153][199](16)"60";:[153][163]9[171][195](a$(i,5)))a$(i,5)
665 tl[178]tl[170][197](a$(i,5))
675 [130]
680 [153]:[153][163]25)"total:"tl
685 [152]2:[160]2:[142]
699 [171][171][171][171][171][143] find a record-----
700 [141]5070
710 [141]1000
720 [142]
799 [171][171][171][171][171][143] save data-----
800 [153]"loadsave-":f1[178]0:[141]2000
805 [139]f1[167][159]2,1,1,fl$:[137]835
810 [159]15,8,15,"io"
815 [159]2,8,2,"@0:"[170]fl$[170]",s,w"
820 [132]15,e,e$,e1,e2
825 [153]"disk status:wait"e;e$;e1;e2
830 [139]e[167][160]2:[160]15:[153]"file not saved.":[141]3000:[142]
835 [152]2,n
840 [129]i[178]1[164]n
845 [129]j[178]1[164]5
850 [152]2,a$(i,j)
870 [130]:[130]
875 [160]2:[139]f1[178]0[167][160]15
880 [142]
999 [172][172][172][172][172][143] sort records*****
1000 [129]x[178]1[164]n
1010 [139]n$[179][177]a$(x,f)[167]1030
1015 [153]:[129]i[178]1[164]5:[153]a$(x,i):[130]
1020 [133]"is this the record";i$
1025 [139][200](i$,1)[178]"y"[167][142]
1027 [153]"load"
1030 [130]
1035 [153]"record not found":[141]3000:fl[178]1:[142]
1999 [171][171][171][171][171][143] filename input-----
2000 [133]"filename:wait";fl$
2010 [133]"dwaitisk or twaitape:";k$
2020 [139]k$[179][177]"d"[175]k$[179][177]"t"[167]2010
2030 [139]k$[178]"t"[167]f1[178]1
2040 [142]
3000 [153][163]5)"pokepress any key to continue.waitstop"
3005 [161]k$:[139]k$[178]""[167]3005
3010 [142]
4000 [153]:[129]i[178]1[164]6:[153]i;c$(i):[130]
4001 [133]"category#";c$
4002 c[178][197](c$):[139]c[179]1[176]c[177]6[167]4001
4003 a$(x,1)[178][200](c$(c),3)
4005 [129]i[178]2[164]5
4010 [153]ca$(i)":";:[133]a$(x,i)
4020 [130]
4030 [133]"correct";i$
4040 [139][200](i$,1)[178]"n"[167]4000
4050 [142]
5000 [153]"load"
5010 [153]"choose:"
5020 [153][163]5)"1. all records
5030 printtab(5)"2. by field
5040 [161]r$:[139]r$[178]""[167]5040
5050 r[178][197](r$):[139]r[179]1[176]r[177]2[167]5000
5060 [139]r[178]1[167][142]
5070 [153]"load"
5080 [153]"choose:"
5090 [129]i[178]1[164]5
5100 [153][163]5)i". "ca$(i):[130]
5120 [161]f$:[139]f$[178]""[167]5120
5130 f[178][197](f$):[139]f[179]1[176]f[177]5[167]5070
5135 [139]f[178]1[167]5155
5140 [153]"enter "ca$(f);:[133]n$
5150 [142]
5155 [153]:[129]i[178]1[164]6:[153]i;c$(i):[130]
5160 [133]"category#";g$
5165 g[178][197](g$):[139]g[179]1[176]g[177]6[167]5160
5170 n$[178][200](c$(g),3)
5175 [142]
6000 [131] category, date, check#, description, amount
6010 [131] medical, taxes, interest, contributions, casualty/theft
6020 [131] miscellaneous
9000 [159]15,8,15,"s0:tax ded":[160]15:[148]"@0:tax ded",8